using System;
using System.Collections.Generic;
using System.Data;
using Orchard.ContentManagement.Drivers;
using Orchard.ContentManagement.MetaData;
using Orchard.ContentManagement.MetaData.Builders;
using Orchard.Core.Contents.Extensions;
using Orchard.Data.Migration;

namespace Orchard.OSM {
    public class Migrations : DataMigrationImpl {

        public int Create() {
			// Creating table JumpListItemRecord
			SchemaBuilder.CreateTable("OpenStreetMapNode", table => table
			  .ContentPartRecord()
			  .Column("OsmNode", DbType.Int64)
			  .Column("Latitude", DbType.Int64)
			  .Column("Longitude", DbType.Int64)
			);
			ContentDefinitionManager.AlterTypeDefinition("OpenStreetMapNode",
		cfg => cfg
		  .WithPart("OpenStreetMapNodePart")
		);

            return 1;
        }
    }
}